<extend name="Public/base"/>
<block name="content">
<script type="text/javascript" src="__JS__/miniplay/swfobject.js"></script>
<script type="text/javascript">
	var so = new SWFObject("__JS__/miniplay/audioplayer.swf","player","220","20","9","#eef0f4");
	so.addParam("allowfullscreen","true");
	so.addParam("allowscriptaccess","always");
	so.addParam("wmode","opaque");	
</script>
<h3 class="col-md-4">歌曲管理</h3>
<div class="row">
    <div class="col-lg-12">
    	<div class="panel panel-default">
       		<div class="panel-heading">待审核列表
       			<div class="btn-group pull-right">
	       			<!--a class="btn btn-labeled btn-success ajax-post "  href="<{:U('setStatus',array('status'=>1))}>" target-form="ids">批量审核</a--> 
	       			<!--a class="btn btn-labeled btn-success ajax-post "  href="<{:U('disable')}>" target-form="ids">未通过</a-->             
	                <a class="btn btn-labeled btn-danger ajax-post" href="<{:U('del')}>" target-form="ids">删除</a>
	         	</div>  			
       		</div>
    		<div class="table-responsive">
        		<table class="table table-striped table-bordered table-hover">           
            		<thead>
                		<tr>
                			<th style="width: 5%" class="check-all">
                          		<div data-toggle="tooltip" data-title="全选" class="checkbox c-checkbox">
                             		<label>
                                		<input type="checkbox">
                                		<span class="fa fa-check"></span>
                             		</label>
                          		</div>
                       		</th>                   			
                			<th>ID</th>
                			<th>歌曲(DJ)</th>
                			<th>上传者</th>
                			<th>专辑</th>                			
                			<th>曲风</th>
                			<th>艺术家</th>
                			<th>试听</th>
             				<th style="width: 5%">状态</th>
             				<th>添加时间</th>
             				<th class="text-center">操作</th>
             			</tr>
            		</thead>
        			<tbody role="alert" aria-live="polite" aria-relevant="all">
        				<notempty name="list">
            			<volist name="list" id="data" key="k">
        				<tr>           
                        	<td>
                          		<div class="checkbox c-checkbox">
                             		<label>
                                	<input type="checkbox" class="ids" value="<{$data.id}>" name="ids[]">
                                	<span class="fa fa-check"></span>
                             		</label>
                          		</div>
                       		</td>
                        	<td><{$data.id}></td>
                        	<td class='m-name'><{$data.name}></td>
                        	<td><{$data.up_uname}></td>
                        	<td><{$data.album_name}></td>
                        	<td><{$data.genre_name}></td>
                        	<td><{$data.artist_name}></td>
                        	<th>
                        		<div id="Player-<{$data.id}>" > <strong>您的Flash Player版本过低！</strong> </div>
								<script type="text/javascript">
									so.addVariable("soundFile","<{$data.music_url}>");　
									so.write("Player-<{$data.id}>");
								</script>
							</th>
                        	<td><{$data.status|get_status_title}></td>
                        	<td><{$data.add_time|time_format='Y-m-d'}></td>
                    		<td class="text-center">
	                            <a class="btn btn-labeled btn-sm btn-sh" herf="javascript:;" url="<{:U('pass')}>" data-id="<{$data['id']}>" data-uid="<{$data['up_uid']}>">通过</a>
	                            <a class="btn btn-labeled btn-sm btn-sh" herf="javascript:;" url="<{:U('disable')}>"  data-id="<{$data['id']}>" data-uid="<{$data['up_uid']}>">驳回</a>
	                            <a class="btn btn-labeled btn-sm btn-danger btn-del" herf="javascript:;" url="<{:U('Songs/setStatus',array('status'=>-1,'ids'=>$data['id']))}>">删除</a>
                         	</td>
                		</tr>
                		</volist>
						<else/>
						<td colspan="12" class="text-center">暂时还没有内容! </td>
						</notempty>
                	</tbody>
                </table>
    		</div>
    		<!-- 结束 表格 -->
    		<div class="panel-footer">
    			<div class="row">
					<ul class="pagination">
					<{$_page}>
					</ul>
				 </div>
            </div>    		
    	</div>
	</div>
</div>
</block>
<block name="script">
<script type="text/javascript">
//导航高亮
highlight_subnav("<{:U('Audit/index')}>");
$(function(){
	$('.btn-sh').click(function () {
		var that = $(this);
		$.ajax({ 
			type: "POST",
			url:$(this).attr('url'), 
			data:"id="+$(this).attr('data-id')+"&uid="+$(this).attr('data-uid'),
			success: function(data){
				topAlert('操作成功！','success');
				that.parents('tr').remove();
				//window.location.reload(); // 刷新页面
			},
			error:function() {
				topAlert('请求失败！');
			}
			
		});
		//alert($("select option:selected").val());
		return false;
	}) 
})
</script>
</block>	


